package org.dydl.model.system;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * Created by Jack on 2018/1/29.
 */
@Entity
public class Goods {
    private int id;
    private String uuid;
    private String pn;
    private String sku;
    private String name;
    private String model;
    private String color;
    private String unit;
    private BigDecimal unitPrice;
    private String currency;
    private BigDecimal taxRate;
    private String upc;
    private Integer inStockQty = 0;
    private String packagingInformation;
    private String type;
    private String handbookNo;
    private String memo;
    private String lossUuid;
    private Integer consumption = 0;
    private String remarks;
    private String item;
    private String createBy;
    private Timestamp createDate;

    @Id
    @Column(name = "ID")
    @GeneratedValue(strategy = GenerationType.AUTO)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "UUID")
    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @Basic
    @Column(name = "PN")
    public String getPn() {
        return pn;
    }

    public void setPn(String pn) {
        this.pn = pn;
    }

    @Basic
    @Column(name = "SKU")
    public String getSku() {
        return sku;
    }

    public void setSku(String sku) {
        this.sku = sku;
    }

    @Basic
    @Column(name = "NAME")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "MODEL")
    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    @Basic
    @Column(name = "COLOR")
    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    @Basic
    @Column(name = "UNIT")
    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    @Basic
    @Column(name = "UNIT_PRICE")
    public BigDecimal getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(BigDecimal unitPrice) {
        this.unitPrice = unitPrice;
    }

    @Basic
    @Column(name = "CURRENCY")
    public String getCurrency() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency;
    }

    @Basic
    @Column(name = "TAX_RATE")
    public BigDecimal getTaxRate() {
        return taxRate;
    }

    public void setTaxRate(BigDecimal taxRate) {
        this.taxRate = taxRate;
    }

    @Basic
    @Column(name = "UPC")
    public String getUpc() {
        return upc;
    }

    public void setUpc(String upc) {
        this.upc = upc;
    }

    @Basic
    @Column(name = "IN_STOCK_QTY")
    public Integer getInStockQty() {
        return inStockQty;
    }

    public void setInStockQty(Integer inStockQty) {
        this.inStockQty = inStockQty;
    }

    @Basic
    @Column(name = "PACKAGING_INFORMATION")
    public String getPackagingInformation() {
        return packagingInformation;
    }

    public void setPackagingInformation(String packagingInformation) {
        this.packagingInformation = packagingInformation;
    }

    @Basic
    @Column(name = "TYPE")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "HANDBOOK_NO")
    public String getHandbookNo() {
        return handbookNo;
    }

    public void setHandbookNo(String handbookNo) {
        this.handbookNo = handbookNo;
    }

    @Basic
    @Column(name = "MEMO")
    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    @Basic
    @Column(name = "LOSS_UUID")
    public String getLossUuid() {
        return lossUuid;
    }

    public void setLossUuid(String lossUuid) {
        this.lossUuid = lossUuid;
    }

    @Basic
    @Column(name = "CONSUMPTION")
    public Integer getConsumption() {
        return consumption;
    }

    public void setConsumption(Integer consumption) {
        this.consumption = consumption;
    }

    @Basic
    @Column(name = "REMARKS")
    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    @Basic
    @Column(name = "ITEM")
    public String getItem() {
        return item;
    }

    public void setItem(String item) {
        this.item = item;
    }

    @Basic
    @Column(name = "CREATE_BY")
    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    @Basic
    @Column(name = "CREATE_DATE")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    public Goods() {
    }

    public Goods(int id, String uuid, String pn, String sku, String name, String model, String color, String unit, BigDecimal unitPrice, String currency, BigDecimal taxRate, String upc, Integer inStockQty, String packagingInformation, String type, String handbookNo, String memo, String lossUuid, Integer consumption, String remarks, String item, String createBy, Timestamp createDate) {
        this.id = id;
        this.uuid = uuid;
        this.pn = pn;
        this.sku = sku;
        this.name = name;
        this.model = model;
        this.color = color;
        this.unit = unit;
        this.unitPrice = unitPrice;
        this.currency = currency;
        this.taxRate = taxRate;
        this.upc = upc;
        this.inStockQty = inStockQty;
        this.packagingInformation = packagingInformation;
        this.type = type;
        this.handbookNo = handbookNo;
        this.memo = memo;
        this.lossUuid = lossUuid;
        this.consumption = consumption;
        this.remarks = remarks;
        this.item = item;
        this.createBy = createBy;
        this.createDate = createDate;
    }
}
